import Vue from 'vue';
import Router from 'vue-router';

Vue.use(Router);

export default new Router({
    routes: [
        {
            path: '/',
            redirect: '/projectManagement'
        },
        {
            path: '/',
            component: () => import(/* webpackChunkName: "home" */ '../components/common/Home.vue'),
            meta: { title: '自述文件' },
            children: [
                {
                    path: '/projectManagement',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/ProjectManagement.vue'),
                    meta: { title: '项目管理' }
                },
                {
                    path: '/projectA',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/ProjectManagement.vue'),
                    meta: { title: '项目管理' }
                },
                {
                    path: '/projectB',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/ProjectManagement.vue'),
                    meta: { title: '项目管理' }
                },
                {
                    path: '/schedule',
                    component: () => import(/* webpackChunkName: "icon" */ '../components/page/Schedule.vue'),
                    meta: { title: '项目进度' }
                },
                {
                    path: '/Analyze',
                    component: () => import(/* webpackChunkName: "table" */ '../components/page/Analyze.vue'),
                    meta: { title: '数据分析' }
                },
                {
                    path: '/DataDownLoad',
                    component: () => import(/* webpackChunkName: "tabs" */ '../components/page/DataDownLoad.vue'),
                    meta: { title: '数据下载' }
                },
                {
                    path: '/Report',
                    component: () => import(/* webpackChunkName: "form" */ '../components/page/Report.vue'),
                    meta: { title: '调研报告' }
                },
                {
                    // 富文本编辑器组件
                    path: '/FeedBack',
                    component: () => import(/* webpackChunkName: "editor" */ '../components/page/FeedBack.vue'),
                    meta: { title: '意见反馈' }
                },
                {
                    path: '/404',
                    component: () => import(/* webpackChunkName: "404" */ '../components/page/404.vue'),
                    meta: { title: '404' }
                },
                {
                    path: '/403',
                    component: () => import(/* webpackChunkName: "403" */ '../components/page/403.vue'),
                    meta: { title: '403' }
                },
            ]
        },
        {
            path: '/login',
            component: () => import(/* webpackChunkName: "login" */ '../components/page/Login.vue')
        },
        {
            path: '*',
            redirect: '/404'
        }
    ]
});
